﻿package plugin.newxunbao
{
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import view.*;

    public class NewXunBao extends FlashUIBase
    {
        private var _ui:NewXunbaoUIExt;

        public function NewXunBao()
        {
            return;
        }// end function

        override protected function preLoaderInit() : void
        {
            super.preLoaderInit();
            appendLoader(Config.getUrl("assets/images/mornui/common.swf", ResourceType.NORMAL));
            appendLoader(Config.getUrl("assets/images/mornui/xunbaoroot.swf", ResourceType.NORMAL));
            return;
        }// end function

        override protected function initGUI() : void
        {
            this._ui = new NewXunbaoUIExt();
            mGUI = this._ui;
            return;
        }// end function

        override protected function openRefresh() : void
        {
            this.uiControl.openRefresh(data);
            return;
        }// end function

        private function get uiControl() : NewXunbaoUIExt
        {
            return mGUI as NewXunbaoUIExt;
        }// end function

        override protected function closeComplete() : void
        {
            super.closeComplete();
            this.uiControl.clearMc();
            return;
        }// end function

        override public function get width() : Number
        {
            if (this._ui.ckview.visible)
            {
                mDargWideRange = [168, 190, 20, 90];
                return super.width;
            }
            mDargWideRange = [168, 190, 75, 90];
            return super.width - 344;
        }// end function

    }
}
